# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=fcitx5-unikey
pkgver=5.1.1
pkgrel=1
pkgdesc="Unikey engine support for Fcitx5"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/fcitx5-unikey"
license=('GPL')
depends=('fcitx5-qt')
makedepends=('extra-cmake-modules' 'ninja')
source=("https://download.fcitx-im.org/fcitx5/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
sha512sums=('05e7b14e0e064c728eecc9037318e6e6cfa2c4494de17ec4dbb20edb92edbce5ad98fdd63509ee5d132082d6bce70e45b4b388fc91b95c992a572cd6bce638a4'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
